﻿<Window x:Class="ORMAC.UI.WPF.Views.SelectObjectsForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:ORMAC.UI.WPF.ViewModel"
        Title="ORMAC::Import Database Tables"  
        Height="450"
        Width="525" ResizeMode="CanResize" ShowInTaskbar="False" Topmost="True" Background="LightGray" WindowStartupLocation="CenterScreen">

    <Window.Resources>
        <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="../Templates/vmTableInfoTemplate.xaml" />
        </ResourceDictionary.MergedDictionaries>
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        </ResourceDictionary>        
    </Window.Resources>

    <Grid Margin="20,0,20,15">
        <Grid.RowDefinitions>
            <RowDefinition Height="340"/>
            <RowDefinition Height="0"/>
            <RowDefinition Height="55"/>
        </Grid.RowDefinitions>
        <GroupBox  Margin="0,10,0,0" Padding="5,10">
            <GroupBox.Header>
                <TextBlock FontWeight="Bold">Select Tables</TextBlock>
            </GroupBox.Header>
            <ListBox  Name="listBoxTables" ItemsSource="{Binding Objects,Mode=TwoWay}" SelectionMode="Multiple" />
        </GroupBox>
        <Button Content="Next" Grid.Row="2"  HorizontalAlignment="Left" Margin="290,18,0,14" Name="buttonNext" VerticalAlignment="Center"  Width="75" IsDefault="True" Click="buttonNext_Click" Visibility="{Binding Path=NextActive, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <Button Content="Finish" Grid.Row="2" HorizontalAlignment="Left" Margin="290,18,0,14" Name="buttonFinish" VerticalAlignment="Center"  Width="75" IsCancel="True" Click="buttonFinish_Click" Visibility="{Binding Path=FinishActive, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <Button Content="Back" Grid.Row="2"  HorizontalAlignment="Left" Margin="210,18,0,15" Name="buttonBack" VerticalAlignment="Center"  Width="75" IsDefault="false" Click="buttonBack_Click" Visibility="{Binding Path=BackActive, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <Button Content="Abort" Grid.Row="2" HorizontalAlignment="Right" Margin="0,18,12,16" Name="buttonAbort" VerticalAlignment="Center"  Width="75" IsCancel="True" Click="buttonAbort_Click" Visibility="{Binding Path=AbortActive, Converter={StaticResource BooleanToVisibilityConverter}}"/>
    </Grid>
</Window>
